#include "comm.hpp"
#include "shm.hpp"
int main()
{
    //写
    Shm sh(USER,PathName,Proj_id);
    FileOperator fo(PATH,FIFO_FILE);
    fo.OpenFileForWrite();

    int index=0;
    char* ret=(char*)sh.VirtualAddress();
    for(char c='A';c<='D';c++,index+=2)
    {
        sleep(1);
        ret[index]=c;
        ret[index+1]=c;
        sleep(1);
        ret[index+2]=0;
        fo.Wakeup();
    }
    // sh.VirtualAddress();
    // sleep(5);

    // sh.destroy();
    // sleep(10);
    fo.Close();
    return 0;
}